package com.unionwo.json;

import com.unionwo.controller.ComplainLogController;

import net.sf.json.JSONObject;

public class BaiduLocationInfoJson {
	
	
	public int resultcode;
	public String resultinfo;
	public Row row ;
	public int getResultcode() {
		return resultcode;
	}
	public void setResultcode(int resultcode) {
		this.resultcode = resultcode;
	}
	public String getResultinfo() {
		return resultinfo;
	}
	public void setResultinfo(String resultinfo) {
		this.resultinfo = resultinfo;
	}
	public Row getRow() {
		return row;
	}
	public void setRow(Row row) {
		this.row = row;
	}
	
	
	
	public static void main(String args[]){
		
		BaiduLocationInfoJson j = new BaiduLocationInfoJson();
		Row r  = new Row();
		j.setRow(r);
		Result rs = new Result();
//		r.setResult(rs);
		JSONObject jo = JSONObject.fromObject(j);
		System.out.println(jo);
		
		double a= 119.9772857,b=27.327578;
		try {
			String abc = ComplainLogController.convert2Address(a,b);
			//String ns=new String(abc.getBytes("utf-8"),"gbk");
			JSONObject jsonObject = JSONObject.fromObject(abc);
			BaiduLocationInfoJson bc = (BaiduLocationInfoJson)JSONObject.toBean(jsonObject, BaiduLocationInfoJson.class);
			System.out.println(bc.getResultcode());
			
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}
	
	
	
	
	
}

